package cheme.ProcessModel.Interpreter.Parsers;

import cheme.Interpreter.Parser.Parser;
import syntaxtree.Node;

public class UnitParser extends AbstractFieldParser
{
	public boolean syntaxIsValid(String text)
	{
		return parse(text) != null;
	}
	
	protected Node internalParse()
	{
		try
		{
			return Parser.SingleUnit();
		}
		catch(Exception e)
		{
			//System.out.println(e.getMessage());
			throw new Error("This unit contains an error.");
		}
	}
}